package com.haiyi.software.messgeExtension;

import org.jivesoftware.smack.packet.PacketExtension;

public class ExtensionUhead implements PacketExtension {

	public static final String ELEMENT = "uhead";
	public static final String NAMESPACE = "39du5.com";

	private String value;

	@Override
	public String getElementName() {
		// TODO 自动生成的方法存根
		return ELEMENT;
	}

	@Override
	public String getNamespace() {
		// TODO 自动生成的方法存根
		return NAMESPACE;
	}

	@Override
	public String toXML() {
		// TODO 自动生成的方法存根
		String sb = createContinueString("<", ELEMENT, ">", getValue(), "</",
				ELEMENT, ">");

		return sb;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	// 连续字符串
	public static String createContinueString(String... strings) {
		StringBuffer sb = new StringBuffer();
		for (String string : strings) {
			sb.append(string);
		}
		return sb.toString();
	}

}
